<script setup>
defineProps({
    banners: Array,
    height: {
        type: String,
        default: '200px'
    }
})
</script>

<template>
    <swiper :style="{height: height}" class="carousel" autoplay indicator-dots circular>
        <swiper-item v-for="item in banners" :key="item.id">
            <image
                class="img"
                :src="item.imgUrl"
                mode="aspectFill"
            />
        </swiper-item>
    </swiper>
</template>
  
<style scoped>
.img {
    width: 100%;
}
</style>